<?php
/*
	创建活动

*/
defined('BY_JYA') or exit('error');
list($goods_id,$active_id,$plugin_name)=$arguments;
$goods=$this->get('goods',array('id'=>$goods_id,'uniacid'=>$_SESSION['uniacid']),array('id','active_plugin'));
if(!$goods){
	exi('指定商品不存在！','error');
}
if($goods['active_plugin']){
	exi('该商品已有活动，不能重复添加！','error');
}
$update=array(
	'active_plugin'=>$plugin_name,
	'active_id'=>$active_id,
);
$this->update('goods',$update,array('id'=>$goods_id));
return true;